﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EmoryResidencyReviewer.BusinessLayer;

namespace EmoryResidencyReviewer.Pages
{
	public partial class AdminLogin : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!IsPostBack)
			{ }


			LoginButton.Click += new EventHandler(LoginButton_Click);

		}

		void LoginButton_Click(object sender, EventArgs e)
		{
			if (CredentialCheck.AdminCredentialCheck(UsernameTextBox.Text, PasswordTextBox.Text))
				Response.Redirect("~/Pages/AdminHome.aspx");
			else { }
			//TODO: Give error message
		}
	}
}